Sponsored Content
Full Discussion: Makefile prerequisites
Top Forums UNIX for Dummies Questions & Answers Makefile prerequisites Post 302726197 by momhef4 on Saturday 3rd of November 2012 09:20:45 PM
Old 11-03-2012
Makefile prerequisites

In the makefile code below am I correct to say that the prerequisites are:
Code:
4thg
4thx
4thd
4thc
lib4th

Code:
OBJ4TH = errs_4th.o save_4th.o load_4th.o free_4th.o comp_4th.o \
	name_4th.o dump_4th.o exec_4th.o open_4th.o hgen_4th.o cgen_4th.o

all: lib4th.a 4th # 4thc 4thd 4thx 4thg

lib4th.a: $(OBJ4TH)
	ar r $@ $(OBJ4TH)

4th: lib4th.a 4th.o
	$(CC) $(CFLAGS) -I. -o $@ $@.o -L. -l4th

4thc: lib4th.a 4thc.o
	$(CC) $(CFLAGS) -I. -o $@ $@.o -L. -l4th

4thd: lib4th.a 4thd.o
	$(CC) $(CFLAGS) -I. -o $@ $@.o -L. -l4th

4thx: lib4th.a 4thx.o
	$(CC) $(CFLAGS) -I. -o $@ $@.o -L. -l4th

4thg: lib4th.a 4thg.o
	$(CC) $(CFLAGS) -I. -o $@ $@.o -L. -l4th

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

2. UNIX for Advanced & Expert Users

Makefile executing another Makefile first?

I have 2 libraries in 2 different directories that I build with Makefiles. library B depends on library A. If I modify a .cpp file in library A and run lib B's Makefile can I have B's makefile to automatically rebuild library A? I am now rebuilding A, followed by B... but I'd like B to... (0 Replies)
Discussion started by: wwuster
0 Replies

3. Solaris

VxVM volume extending Prerequisites

Hellow Experts, Could anyone tell me the Prerequisites for extending a Volume on VxVM. (3 Replies)
Discussion started by: sudhan143
3 Replies

4. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

5. Solaris

Prerequisites for Solaris10 Branded Zone within Solaris 11 Express

Dear all, we are trying to install a Solaris10 Branded Zone on a Solaris 11 Express system getting this message: ***The image patch level is downrev for running in a solaris10 branded zone*** The Sparc Solaris 10 system is running Release 11/06 and Patch 119254-70 is installed. Does the... (0 Replies)
Discussion started by: xunil321
0 Replies

6. Programming

J2EE prerequisites

Hi guys, I'm going to start studding about J2EE in a couple of weeks. I have no idea about its technologies. what prerequisites do i need. I only know java and have basic knowledge about HTML. I have a solid knowledge on database. 1. Do i need java script or CSS knowledge for JSP and JSF? 2.... (1 Reply)
Discussion started by: majid.merkava
1 Replies

7. AIX

Prerequisites for installing VIOS

Hello, I am trying to setup LPARs on a p7 system. There is an existing install of AIX 7.1 that we have been using for various tasks. Can I install VIOS on top of this existing OS without any other prep work? Or is it advisable to install a fresh copy of AIX before installing VIOS on it? ... (1 Reply)
Discussion started by: bstring
1 Replies

8. AIX

Prerequisites for Infosphere v9.1

Hi, We want to install Infosphere v9.1 and the manual illustrates the below requirements. I am not good at unix. So want to clarify and know whether I am going the right direction. Prerequisites are below All AIX 6.1 technology levels and fix packs are supported. Processors: RISC POWER5,... (4 Replies)
Discussion started by: tostay2003
4 Replies

9. AIX

PreRequisites for Dynamic LPAR actions

Hello All, To perform Dynamic Operations from HMC in command Line (such as adding cpu to an lpar for example) in order to avoid stopping Applications, What PreRequisites are needed ? AIX version ? HMC version ? Filesets (applied/committed) ? and what else should I have to check ...? What is... (2 Replies)
Discussion started by: LoLo92
2 Replies
STYLE.MAKEFILE(5)					      BSD File Formats Manual						 STYLE.MAKEFILE(5)

NAME
style.Makefile -- FreeBSD Makefile file style guide DESCRIPTION
This file specifies the preferred style for makefiles in the FreeBSD source tree. o All makefiles should have an SCM ID at the start of the file, followed by a blank line. # $FreeBSD$ o .PATH: comes next if needed, and is spelled ``.PATH: '', with a single ASCII space after a colon. Do not use the VPATH variable. o Special variables (i.e., LIB, SRCS, MLINKS, etc.) are listed in order of ``product'', then building and installing a binary. Special variables may also be listed in ``build'' order: i.e., ones for the primary program (or library) first. The general ``product'' order is: PROG/[SH]LIB/SCRIPTS FILES LINKS [NO_]MAN MLINKS INCS SRCS WARNS CFLAGS DPADD LDADD. The general ``build'' order is: PROG/[SH]LIB/SCRIPTS SRCS WARNS CFLAGS DPADD LDADD INCS FILES LINKS [NO_]MAN MLINKS. o Omit SRCS when using <bsd.prog.mk> and there is a single source file named the same as the PROG. o Omit MAN when using <bsd.prog.mk> and the manual page is named the same as the PROG, and is in section 1. o All variable assignments are spelled ``VAR='', i.e., no space between the variable name and the =. Keep values sorted alphabetically, if possible. o Do not use += to set variables that are only set once (or to set variables for the first time). o Do not use vertical whitespace in simple makefiles, but do use it to group locally related things in more complex/longer ones. o WARNS comes before CFLAGS, as it is basically a CFLAGS modifier. It comes before CFLAGS rather than after CFLAGS so it does not get lost in a sea of CFLAGS statements as WARNS is an important thing. The usage of WARNS is spelled ``WARNS?= '', so that it may be overridden on the command line or in make.conf(5). o ``NO_WERROR= yes'' should not be used, it defeats the purpose of WARNS. It should only be used on the command line and in special cir- cumstances. o CFLAGS is spelled ``CFLAGS+= ''. o Listing -D's before -I's in CFLAGS is preferred for alphabetical ordering and to make -D's easier to see. The -D's often affect condi- tional compilation, and -I's tend to be quite long. Split long CFLAGS settings between the -D's and -I's. o Do not use GCCisms (such as -g and -Wall) in CFLAGS. o Typically, there is one ASCII tab between VAR= and the value in order to start the value in column 9. An ASCII space is allowed for variable names that extend beyond column 9. A lack of whitespace is also allowed for very long variable names. o .include <bsd.*.mk> goes last. o Do not use anachronisms like $< and $@. Instead use ${.IMPSRC} or ${.ALLSRC} and ${.TARGET}. o To not build the ``foo'' part of the base system, use NO_FOO, not NOFOO. o To optionally build something in the base system, spell the knob WITH_FOO not WANT_FOO or USE_FOO. The latter are reserved for the FreeBSD Ports Collection. o For variables that are only checked with defined(), do not provide any fake value. The desire to express a logical grouping often means not obeying some of the above. EXAMPLES
The simplest program Makefile is: # $FreeBSD$ PROG= foo .include <bsd.prog.mk> The simplest library Makefile is: # $FreeBSD$ LIB= foo SHLIB_MAJOR= 1 MAN= libfoo.3 SRCS= foo.c .include <bsd.lib.mk> SEE ALSO
make(1), make.conf(5), style(9) HISTORY
This manual page is inspired from the same source as style(9) manual page in FreeBSD. BUGS
There are few hard and fast style rules here. The style of many things is too dependent on the context of the whole makefile, or the lines surrounding it. BSD
January 8, 2005 BSD
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy