blob: 8a2f6a9a2f615d8ce1cb2129b2b0184c91576c53 [file] [log] [blame]
Norman Jamese2765102015-08-19 22:00:55 -05001CC=gcc
2OBJS = objects/pflash/progress.o objects/pflash/ast-sf-ctrl.o
3OBJS += objects/pflash/libflash/libflash.o objects/pflash/libflash/libffs.o
4OBJS += objects/pflash/arm_io.o
5LIBS=/gsa/ausgsa/home/n/j/njames/openbmc
Norman James362a80f2015-09-14 14:04:39 -05006OFLAGS =-L$(HOME)/lib -lopenbmc_intf
Norman Jamese2765102015-08-19 22:00:55 -05007HOME = /media/sf_vbox/openbmc
8CFLAGS=$(shell pkg-config --libs --cflags gtk+-2.0 glib-2.0)
9
10%.o: interfaces/%.c
Norman James362a80f2015-09-14 14:04:39 -050011 $(CC) -c -fPIC -o obj/$@ $< -I$(HOME) -I$(HOME)/includes $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050012
13%.o: objects/%.c
Norman James362a80f2015-09-14 14:04:39 -050014 $(CC) -c -o obj/$@ $< -L$(HOME)/lib -I$(HOME) -I$(HOME)/includes -I$(HOME)/objects/pflash -lfru $(CFLAGS)
Norman Jamesddb97382015-08-27 21:31:31 -050015
16%.o: includes/%.c
17 $(CC) -c -o obj/$@ $< -I$(HOME) -I$(HOME)/includes -I$(HOME)/objects/pflash $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050018
19%.o: objects/pflash/%.c
20 $(CC) -c -o obj/$@ $< -I$(HOME) -I$(HOME)/objects/pflash $(CFLAGS)
21
Norman James362a80f2015-09-14 14:04:39 -050022libopenbmc_intf: openbmc_intf.o
23 $(CC) -shared -o lib/$@.so obj/openbmc_intf.o $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050024
Norman James362a80f2015-09-14 14:04:39 -050025power_control: power_control_obj.o gpio.o
26 $(CC) -o bin/$@.exe obj/gpio.o obj/power_control_obj.o $(OFLAGS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050027
Norman James362a80f2015-09-14 14:04:39 -050028chassis_identify: chassis_identify_obj.o gpio.o
29 $(CC) -o bin/$@.exe obj/gpio.o obj/chassis_identify_obj.o $(OFLAGS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050030
Norman James362a80f2015-09-14 14:04:39 -050031sensor_ambient: sensor_threshold.o sensor_temperature_ambient_obj.o
32 $(CC) -o bin/$@.exe obj/sensor_threshold.o obj/sensor_temperature_ambient_obj.o $(OFLAGS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050033
Norman James362a80f2015-09-14 14:04:39 -050034button_power: button_power_obj.o gpio.o
35 $(CC) -o bin/$@.exe obj/button_power_obj.o $(OFLAGS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050036
Norman James362a80f2015-09-14 14:04:39 -050037sensor_host_status: sensor_host_status_obj.o
38 $(CC) -o bin/$@.exe obj/sensor_host_status_obj.o $(OFLAGS) $(CFLAGS)
Norman James9e6acf92015-09-08 07:00:04 -050039
Norman James362a80f2015-09-14 14:04:39 -050040control_host: control_host_obj.o gpio.o
41 $(CC) -o bin/$@.exe obj/gpio.o obj/control_host_obj.o $(OFLAGS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050042
Norman James362a80f2015-09-14 14:04:39 -050043flash_bios: pflash.o flash_bios_obj.o
44 $(CC) -o bin/$@.exe obj/flash_bios_obj.o $(OFLAGS) $(OBJS) $(CFLAGS)
Norman Jamese2765102015-08-19 22:00:55 -050045
Norman James362a80f2015-09-14 14:04:39 -050046fan: fan_generic_obj.o gpio.o
47 $(CC) -o bin/$@.exe obj/gpio.o obj/fan_generic_obj.o $(OFLAGS) $(CFLAGS)
Norman James471ab592015-08-30 22:29:40 -050048
Norman James362a80f2015-09-14 14:04:39 -050049host_watchdog: host_watchdog_obj.o
50 $(CC) -o bin/$@.exe obj/host_watchdog_obj.o $(OFLAGS) $(CFLAGS)
Norman James471ab592015-08-30 22:29:40 -050051
Norman James362a80f2015-09-14 14:04:39 -050052control_bmc: control_bmc_obj.o
53 $(CC) -o bin/$@.exe obj/control_bmc_obj.o $(OFLAGS) $(CFLAGS)
Norman James471ab592015-08-30 22:29:40 -050054
Norman James362a80f2015-09-14 14:04:39 -050055sensor_occ: sensor_occ_obj.o
56 $(CC) -o bin/$@.exe obj/sensor_occ_obj.o $(OFLAGS) $(CFLAGS)
Norman James471ab592015-08-30 22:29:40 -050057
Norman James362a80f2015-09-14 14:04:39 -050058board_vpd: board_vpd_obj.o
59 $(CC) -o bin/$@.exe obj/board_vpd_obj.o $(OFLAGS) $(CFLAGS)